<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>《Flutter插件awesome_dialog》 - Lucklyの博客 - 在阅读中遇见自己</title><meta name="Description" content="早起的年轻人做的网站"><meta property="og:title" content="《Flutter插件awesome_dialog》" />
<meta property="og:description" content="
本文主要介绍一个新的Flutter软件包项目，用于简单而出色的对话框，我们在应用程序中使用它来向用户显示某些警告或确认，在这种情况下，我们可以通过使用一些属性在其中使用其他类型的动画。并可以设置颜色，文字等
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" />
<meta property="og:image" content="https://luckly.work/logo.png"/>
<meta property="article:published_time" content="2021-05-24T22:10:25+08:00" />
<meta property="article:modified_time" content="2021-05-24T22:10:25+08:00" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://luckly.work/logo.png"/>

<meta name="twitter:title" content="《Flutter插件awesome_dialog》"/>
<meta name="twitter:description" content="
本文主要介绍一个新的Flutter软件包项目，用于简单而出色的对话框，我们在应用程序中使用它来向用户显示某些警告或确认，在这种情况下，我们可以通过使用一些属性在其中使用其他类型的动画。并可以设置颜色，文字等
"/>
<meta name="application-name" content="LoveIt">
<meta name="apple-mobile-web-app-title" content="LoveIt"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" /><link rel="prev" href="https://luckly.work/%E5%9C%A8flutter%E4%B8%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A71/" /><link rel="next" href="https://luckly.work/dart%E4%B9%8Blist%E7%9B%B8%E5%85%B3/" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "《Flutter插件awesome_dialog》",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/luckly.work\/flutter%E6%8F%92%E4%BB%B6awesome_dialog\/"
        },"image": [{
                            "@type": "ImageObject",
                            "url": "https:\/\/luckly.work\/images\/Apple-Devices-Preview.png",
                            "width":  3200 ,
                            "height":  2048 
                        }],"genre": "posts","keywords": "flutter, 插件","wordcount":  1572 ,
        "url": "https:\/\/luckly.work\/flutter%E6%8F%92%E4%BB%B6awesome_dialog\/","datePublished": "2021-05-24T22:10:25+08:00","dateModified": "2021-05-24T22:10:25+08:00","license": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.","publisher": {
            "@type": "Organization",
            "name": "xxxx","logo": {
                    "@type": "ImageObject",
                    "url": "https:\/\/luckly.work\/images\/avatar.png",
                    "width":  528 ,
                    "height":  560 
                }},"author": {
                "@type": "Person",
                "name": "早起的年轻人"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><div class="logo-wrapper">
  <a href="/%20/" class="logo">Lucklyの博客 - 在阅读中遇见自己</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
      <a class="menu-item-link" href="/posts/">所有文章</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/flutter/">Flutter</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/read/">读书笔记</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/go/">Go</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/tags/">标签</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/categories/">分类</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/about/">关于</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="https://github.com/ITmxs">Github</a>
    </li><li class="menu-item">
      <a class="menu-item-link" href="/friend/">友链</a>
    </li>
  </ul>
</nav><main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">《Flutter插件awesome_dialog》</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>早起的年轻人</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/flutter/"><i class="far fa-folder fa-fw"></i>Flutter</a>&nbsp;<a href="/categories/%E6%8F%92%E4%BB%B6/"><i class="far fa-folder fa-fw"></i>插件</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2021-05-24">2021-05-24</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 1572 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 4 分钟&nbsp;</div>
        </div><div class="featured-image"><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"
        data-srcset="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png, https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png 1.5x, https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png 2x"
        data-sizes="auto"
        alt="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"
        title="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png" /></div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li>
          <ul>
            <li><a href="#使用">使用</a></li>
            <li><a href="#属性-">属性 ：</a></li>
            <li><a href="#例子">例子</a></li>
            <li><a href="#custom-body">Custom Body</a></li>
            <li><a href="#自定义按钮">自定义按钮</a>
              <ul>
                <li><a href="#demo">demo</a></li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><blockquote>
<p>本文主要介绍一个新的Flutter软件包项目，用于简单而出色的对话框，我们在应用程序中使用它来向用户显示某些警告或确认，在这种情况下，我们可以通过使用一些属性在其中使用其他类型的动画。并可以设置颜色，文字等</p>
</blockquote>
<h3 id="使用">使用</h3>
<p><strong>步骤1：添加依赖项。</strong></p>
<blockquote>
<p>*<strong>将依赖项添加到pubspec-yaml文件。*</strong></p>
</blockquote>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">dependencies:   
awesome_dialog: ^1.3.2
</code></pre></td></tr></table>
</div>
</div><blockquote>
<p>*<strong>步骤2：导入软件包：*</strong></p>
</blockquote>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">import &#39;package:awesome_dialog/awesome_dialog.dart&#39;;
</code></pre></td></tr></table>
</div>
</div><blockquote>
<p>*<strong>步骤3：运行flutter包*</strong></p>
</blockquote>
<p><a href="https://github.com/marcos930807/awesomeDialogs/raw/master/doc/gif.gif">https://github.com/marcos930807/awesomeDialogs/raw/master/doc/gif.gif</a></p>
<h3 id="属性-">属性 ：</h3>
<blockquote>
<p>*<strong>以下是“awesome_dialog”对话框的基本属性。*</strong></p>
</blockquote>
<ul>
<li>**animType-**使用animType属性更改对话框的动画。</li>
<li><strong>dialogType</strong> — dialogType用于对话框类型属性，例如info，error等。</li>
<li><strong>title-</strong> title属性用于将对话框标题设置为对话框。</li>
<li><strong>desc</strong> — desc属性用于对话框说明。</li>
<li><strong>autoHide</strong> — autoHide属性会在一段时间后隐藏，可以将其时间设置为任何时间。</li>
</ul>
<h3 id="例子">例子</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">AwesomeDialog(
            context: context,
            dialogType: DialogType.INFO,
            animType: AnimType.BOTTOMSLIDE,
            title: &#39;Dialog Title&#39;,
            desc: &#39;Dialog description here.............&#39;,
            btnCancelOnPress: () {},
            btnOkOnPress: () {},
            )..show();
</code></pre></td></tr></table>
</div>
</div><h3 id="custom-body">Custom Body</h3>
<p>如果指定了正文，则标题和描述将被忽略，这允许进一步自定义对话框。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">AwesomeDialog(
            context: context,
            animType: AnimType.SCALE,
            dialogType: DialogType.INFO,
            body: Center(child: Text(
                    &#39;If the body is specified, then title and description will be ignored, this allows to further customize the dialogue.&#39;,
                    style: TextStyle(fontStyle: FontStyle.italic),
                  ),),
            title: &#39;This is Ignored&#39;,
            desc:   &#39;This is also Ignored&#39;,
            btnOkOnPress: () {},
                 )..show();
</code></pre></td></tr></table>
</div>
</div><h3 id="自定义按钮">自定义按钮</h3>
<p>要使用自定义按钮，只需指定buttonOk或btnCancel小部件，所有文本参数图标等都将被忽略。</p>
<h4 id="demo">demo</h4>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">  1
</span><span class="lnt">  2
</span><span class="lnt">  3
</span><span class="lnt">  4
</span><span class="lnt">  5
</span><span class="lnt">  6
</span><span class="lnt">  7
</span><span class="lnt">  8
</span><span class="lnt">  9
</span><span class="lnt"> 10
</span><span class="lnt"> 11
</span><span class="lnt"> 12
</span><span class="lnt"> 13
</span><span class="lnt"> 14
</span><span class="lnt"> 15
</span><span class="lnt"> 16
</span><span class="lnt"> 17
</span><span class="lnt"> 18
</span><span class="lnt"> 19
</span><span class="lnt"> 20
</span><span class="lnt"> 21
</span><span class="lnt"> 22
</span><span class="lnt"> 23
</span><span class="lnt"> 24
</span><span class="lnt"> 25
</span><span class="lnt"> 26
</span><span class="lnt"> 27
</span><span class="lnt"> 28
</span><span class="lnt"> 29
</span><span class="lnt"> 30
</span><span class="lnt"> 31
</span><span class="lnt"> 32
</span><span class="lnt"> 33
</span><span class="lnt"> 34
</span><span class="lnt"> 35
</span><span class="lnt"> 36
</span><span class="lnt"> 37
</span><span class="lnt"> 38
</span><span class="lnt"> 39
</span><span class="lnt"> 40
</span><span class="lnt"> 41
</span><span class="lnt"> 42
</span><span class="lnt"> 43
</span><span class="lnt"> 44
</span><span class="lnt"> 45
</span><span class="lnt"> 46
</span><span class="lnt"> 47
</span><span class="lnt"> 48
</span><span class="lnt"> 49
</span><span class="lnt"> 50
</span><span class="lnt"> 51
</span><span class="lnt"> 52
</span><span class="lnt"> 53
</span><span class="lnt"> 54
</span><span class="lnt"> 55
</span><span class="lnt"> 56
</span><span class="lnt"> 57
</span><span class="lnt"> 58
</span><span class="lnt"> 59
</span><span class="lnt"> 60
</span><span class="lnt"> 61
</span><span class="lnt"> 62
</span><span class="lnt"> 63
</span><span class="lnt"> 64
</span><span class="lnt"> 65
</span><span class="lnt"> 66
</span><span class="lnt"> 67
</span><span class="lnt"> 68
</span><span class="lnt"> 69
</span><span class="lnt"> 70
</span><span class="lnt"> 71
</span><span class="lnt"> 72
</span><span class="lnt"> 73
</span><span class="lnt"> 74
</span><span class="lnt"> 75
</span><span class="lnt"> 76
</span><span class="lnt"> 77
</span><span class="lnt"> 78
</span><span class="lnt"> 79
</span><span class="lnt"> 80
</span><span class="lnt"> 81
</span><span class="lnt"> 82
</span><span class="lnt"> 83
</span><span class="lnt"> 84
</span><span class="lnt"> 85
</span><span class="lnt"> 86
</span><span class="lnt"> 87
</span><span class="lnt"> 88
</span><span class="lnt"> 89
</span><span class="lnt"> 90
</span><span class="lnt"> 91
</span><span class="lnt"> 92
</span><span class="lnt"> 93
</span><span class="lnt"> 94
</span><span class="lnt"> 95
</span><span class="lnt"> 96
</span><span class="lnt"> 97
</span><span class="lnt"> 98
</span><span class="lnt"> 99
</span><span class="lnt">100
</span><span class="lnt">101
</span><span class="lnt">102
</span><span class="lnt">103
</span><span class="lnt">104
</span><span class="lnt">105
</span><span class="lnt">106
</span><span class="lnt">107
</span><span class="lnt">108
</span><span class="lnt">109
</span><span class="lnt">110
</span><span class="lnt">111
</span><span class="lnt">112
</span><span class="lnt">113
</span><span class="lnt">114
</span><span class="lnt">115
</span><span class="lnt">116
</span><span class="lnt">117
</span><span class="lnt">118
</span><span class="lnt">119
</span><span class="lnt">120
</span><span class="lnt">121
</span><span class="lnt">122
</span><span class="lnt">123
</span><span class="lnt">124
</span><span class="lnt">125
</span><span class="lnt">126
</span><span class="lnt">127
</span><span class="lnt">128
</span><span class="lnt">129
</span><span class="lnt">130
</span><span class="lnt">131
</span><span class="lnt">132
</span><span class="lnt">133
</span><span class="lnt">134
</span><span class="lnt">135
</span><span class="lnt">136
</span><span class="lnt">137
</span><span class="lnt">138
</span><span class="lnt">139
</span><span class="lnt">140
</span><span class="lnt">141
</span><span class="lnt">142
</span><span class="lnt">143
</span><span class="lnt">144
</span><span class="lnt">145
</span><span class="lnt">146
</span><span class="lnt">147
</span><span class="lnt">148
</span><span class="lnt">149
</span><span class="lnt">150
</span><span class="lnt">151
</span><span class="lnt">152
</span><span class="lnt">153
</span><span class="lnt">154
</span><span class="lnt">155
</span><span class="lnt">156
</span><span class="lnt">157
</span><span class="lnt">158
</span><span class="lnt">159
</span><span class="lnt">160
</span><span class="lnt">161
</span><span class="lnt">162
</span><span class="lnt">163
</span><span class="lnt">164
</span><span class="lnt">165
</span><span class="lnt">166
</span><span class="lnt">167
</span><span class="lnt">168
</span><span class="lnt">169
</span><span class="lnt">170
</span><span class="lnt">171
</span><span class="lnt">172
</span><span class="lnt">173
</span><span class="lnt">174
</span><span class="lnt">175
</span><span class="lnt">176
</span><span class="lnt">177
</span><span class="lnt">178
</span><span class="lnt">179
</span><span class="lnt">180
</span><span class="lnt">181
</span><span class="lnt">182
</span><span class="lnt">183
</span><span class="lnt">184
</span><span class="lnt">185
</span><span class="lnt">186
</span><span class="lnt">187
</span><span class="lnt">188
</span><span class="lnt">189
</span><span class="lnt">190
</span><span class="lnt">191
</span><span class="lnt">192
</span><span class="lnt">193
</span><span class="lnt">194
</span><span class="lnt">195
</span><span class="lnt">196
</span><span class="lnt">197
</span><span class="lnt">198
</span><span class="lnt">199
</span><span class="lnt">200
</span><span class="lnt">201
</span><span class="lnt">202
</span><span class="lnt">203
</span><span class="lnt">204
</span><span class="lnt">205
</span><span class="lnt">206
</span><span class="lnt">207
</span><span class="lnt">208
</span><span class="lnt">209
</span><span class="lnt">210
</span><span class="lnt">211
</span><span class="lnt">212
</span><span class="lnt">213
</span><span class="lnt">214
</span><span class="lnt">215
</span><span class="lnt">216
</span><span class="lnt">217
</span><span class="lnt">218
</span><span class="lnt">219
</span><span class="lnt">220
</span><span class="lnt">221
</span><span class="lnt">222
</span><span class="lnt">223
</span><span class="lnt">224
</span><span class="lnt">225
</span><span class="lnt">226
</span><span class="lnt">227
</span><span class="lnt">228
</span><span class="lnt">229
</span><span class="lnt">230
</span><span class="lnt">231
</span><span class="lnt">232
</span><span class="lnt">233
</span><span class="lnt">234
</span><span class="lnt">235
</span><span class="lnt">236
</span><span class="lnt">237
</span><span class="lnt">238
</span><span class="lnt">239
</span><span class="lnt">240
</span><span class="lnt">241
</span><span class="lnt">242
</span><span class="lnt">243
</span><span class="lnt">244
</span><span class="lnt">245
</span><span class="lnt">246
</span><span class="lnt">247
</span><span class="lnt">248
</span><span class="lnt">249
</span><span class="lnt">250
</span><span class="lnt">251
</span><span class="lnt">252
</span><span class="lnt">253
</span><span class="lnt">254
</span><span class="lnt">255
</span><span class="lnt">256
</span><span class="lnt">257
</span><span class="lnt">258
</span><span class="lnt">259
</span><span class="lnt">260
</span><span class="lnt">261
</span><span class="lnt">262
</span><span class="lnt">263
</span><span class="lnt">264
</span><span class="lnt">265
</span><span class="lnt">266
</span><span class="lnt">267
</span><span class="lnt">268
</span><span class="lnt">269
</span><span class="lnt">270
</span><span class="lnt">271
</span><span class="lnt">272
</span><span class="lnt">273
</span><span class="lnt">274
</span><span class="lnt">275
</span><span class="lnt">276
</span><span class="lnt">277
</span><span class="lnt">278
</span><span class="lnt">279
</span><span class="lnt">280
</span><span class="lnt">281
</span><span class="lnt">282
</span><span class="lnt">283
</span><span class="lnt">284
</span><span class="lnt">285
</span><span class="lnt">286
</span><span class="lnt">287
</span><span class="lnt">288
</span><span class="lnt">289
</span><span class="lnt">290
</span><span class="lnt">291
</span><span class="lnt">292
</span><span class="lnt">293
</span><span class="lnt">294
</span><span class="lnt">295
</span><span class="lnt">296
</span><span class="lnt">297
</span><span class="lnt">298
</span><span class="lnt">299
</span><span class="lnt">300
</span><span class="lnt">301
</span><span class="lnt">302
</span><span class="lnt">303
</span><span class="lnt">304
</span><span class="lnt">305
</span><span class="lnt">306
</span><span class="lnt">307
</span><span class="lnt">308
</span><span class="lnt">309
</span><span class="lnt">310
</span><span class="lnt">311
</span><span class="lnt">312
</span><span class="lnt">313
</span><span class="lnt">314
</span><span class="lnt">315
</span><span class="lnt">316
</span><span class="lnt">317
</span><span class="lnt">318
</span><span class="lnt">319
</span><span class="lnt">320
</span><span class="lnt">321
</span><span class="lnt">322
</span><span class="lnt">323
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-dart" data-lang="dart"><span class="k">import</span> <span class="s1">&#39;package:awesome_dialog/awesome_dialog.dart&#39;</span><span class="p">;</span>
<span class="k">import</span> <span class="s1">&#39;package:flutter/material.dart&#39;</span><span class="p">;</span>

<span class="k">import</span> <span class="s1">&#39;routes.dart&#39;</span><span class="p">;</span>

<span class="kt">void</span> <span class="n">main</span><span class="p">()</span> <span class="o">=&gt;</span> <span class="n">runApp</span><span class="p">(</span><span class="n">MyApp</span><span class="p">());</span>

<span class="kd">class</span> <span class="nc">MyApp</span> <span class="kd">extends</span> <span class="n">StatelessWidget</span> <span class="p">{</span>
  <span class="err">@</span><span class="n">override</span>
  <span class="n">Widget</span> <span class="n">build</span><span class="p">(</span><span class="n">BuildContext</span> <span class="n">context</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">return</span> <span class="n">MaterialApp</span><span class="p">(</span>
      <span class="nl">title:</span> <span class="s1">&#39;Fancy Dialog Example&#39;</span><span class="p">,</span>
      <span class="nl">theme:</span> <span class="n">ThemeData</span><span class="p">.</span><span class="n">dark</span><span class="p">(),</span>
      <span class="nl">initialRoute:</span> <span class="s1">&#39;/&#39;</span><span class="p">,</span>
      <span class="nl">onGenerateRoute:</span> <span class="n">RouteGenerator</span><span class="p">.</span><span class="n">generateRoute</span><span class="p">,</span>
    <span class="p">);</span>
  <span class="p">}</span>
<span class="p">}</span>

<span class="kd">class</span> <span class="nc">HomePage</span> <span class="kd">extends</span> <span class="n">StatefulWidget</span> <span class="p">{</span>
  <span class="kd">const</span> <span class="n">HomePage</span><span class="p">({</span>
    <span class="n">Key</span><span class="o">?</span> <span class="n">key</span><span class="p">,</span>
  <span class="p">})</span> <span class="o">:</span> <span class="k">super</span><span class="p">(</span><span class="nl">key:</span> <span class="n">key</span><span class="p">);</span>

  <span class="err">@</span><span class="n">override</span>
  <span class="n">_HomePageState</span> <span class="n">createState</span><span class="p">()</span> <span class="o">=&gt;</span> <span class="n">_HomePageState</span><span class="p">();</span>
<span class="p">}</span>

<span class="kd">class</span> <span class="nc">_HomePageState</span> <span class="kd">extends</span> <span class="n">State</span><span class="o">&lt;</span><span class="n">HomePage</span><span class="o">&gt;</span> <span class="p">{</span>
  <span class="err">@</span><span class="n">override</span>
  <span class="n">Widget</span> <span class="n">build</span><span class="p">(</span><span class="n">BuildContext</span> <span class="n">context</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">return</span> <span class="n">Scaffold</span><span class="p">(</span>
        <span class="nl">appBar:</span> <span class="n">AppBar</span><span class="p">(</span>
          <span class="nl">title:</span> <span class="n">Text</span><span class="p">(</span><span class="s1">&#39;Awesome Dialog Example&#39;</span><span class="p">),</span>
        <span class="p">),</span>
        <span class="nl">body:</span> <span class="n">Center</span><span class="p">(</span>
            <span class="nl">child:</span> <span class="n">Container</span><span class="p">(</span>
          <span class="nl">padding:</span> <span class="n">EdgeInsets</span><span class="p">.</span><span class="n">all</span><span class="p">(</span><span class="m">16</span><span class="p">),</span>
          <span class="nl">child:</span> <span class="n">SingleChildScrollView</span><span class="p">(</span>
            <span class="nl">child:</span> <span class="n">Column</span><span class="p">(</span>
              <span class="nl">children:</span> <span class="o">&lt;</span><span class="n">Widget</span><span class="o">&gt;</span><span class="p">[</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Info Dialog fixed width and sqare buttons&#39;</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">borderSide:</span> <span class="n">BorderSide</span><span class="p">(</span><span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">green</span><span class="p">,</span> <span class="nl">width:</span> <span class="m">2</span><span class="p">),</span>
                      <span class="nl">width:</span> <span class="m">280</span><span class="p">,</span>
                      <span class="nl">buttonsBorderRadius:</span> <span class="n">BorderRadius</span><span class="p">.</span><span class="n">all</span><span class="p">(</span><span class="n">Radius</span><span class="p">.</span><span class="n">circular</span><span class="p">(</span><span class="m">2</span><span class="p">)),</span>
                      <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">BOTTOMSLIDE</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;INFO&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span> <span class="s1">&#39;Dialog description here...&#39;</span><span class="p">,</span>
                      <span class="nl">showCloseIcon:</span> <span class="kc">true</span><span class="p">,</span>
                      <span class="nl">btnCancelOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                      <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Question Dialog With Custom BTN Style&#39;</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">QUESTION</span><span class="p">,</span>
                      <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">BOTTOMSLIDE</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;Question&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span> <span class="s1">&#39;Dialog description here...&#39;</span><span class="p">,</span>
                      <span class="nl">buttonsTextStyle:</span> <span class="n">TextStyle</span><span class="p">(</span><span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">black</span><span class="p">),</span>
                      <span class="nl">showCloseIcon:</span> <span class="kc">true</span><span class="p">,</span>
                      <span class="nl">btnCancelOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                      <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Info Dialog Without buttons&#39;</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">headerAnimationLoop:</span> <span class="kc">true</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">BOTTOMSLIDE</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;INFO&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span>
                          <span class="s1">&#39;Lorem ipsum dolor sit amet consectetur adipiscing elit eget ornare tempus, vestibulum sagittis rhoncus felis hendrerit lectus ultricies duis vel, id morbi cum ultrices tellus metus dis ut donec. Ut sagittis viverra venenatis eget euismod faucibus odio ligula phasellus,&#39;</span><span class="p">,</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Warning Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">orange</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                        <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                        <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">WARNING</span><span class="p">,</span>
                        <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                        <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">TOPSLIDE</span><span class="p">,</span>
                        <span class="nl">showCloseIcon:</span> <span class="kc">true</span><span class="p">,</span>
                        <span class="nl">closeIcon:</span> <span class="n">Icon</span><span class="p">(</span><span class="n">Icons</span><span class="p">.</span><span class="n">close_fullscreen_outlined</span><span class="p">),</span>
                        <span class="nl">title:</span> <span class="s1">&#39;Warning&#39;</span><span class="p">,</span>
                        <span class="nl">desc:</span>
                            <span class="s1">&#39;Dialog description here..................................................&#39;</span><span class="p">,</span>
                        <span class="nl">btnCancelOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                        <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{})</span>
                      <span class="p">..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Error Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">red</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                        <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                        <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">ERROR</span><span class="p">,</span>
                        <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">RIGHSLIDE</span><span class="p">,</span>
                        <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                        <span class="nl">title:</span> <span class="s1">&#39;Error&#39;</span><span class="p">,</span>
                        <span class="nl">desc:</span>
                            <span class="s1">&#39;Dialog description here..................................................&#39;</span><span class="p">,</span>
                        <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                        <span class="nl">btnOkIcon:</span> <span class="n">Icons</span><span class="p">.</span><span class="n">cancel</span><span class="p">,</span>
                        <span class="nl">btnOkColor:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">red</span><span class="p">)</span>
                      <span class="p">..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Succes Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">green</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                        <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                        <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">LEFTSLIDE</span><span class="p">,</span>
                        <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                        <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">SUCCES</span><span class="p">,</span>
                        <span class="nl">title:</span> <span class="s1">&#39;Succes&#39;</span><span class="p">,</span>
                        <span class="nl">desc:</span>
                            <span class="s1">&#39;Dialog description here..................................................&#39;</span><span class="p">,</span>
                        <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{</span>
                          <span class="n">debugPrint</span><span class="p">(</span><span class="s1">&#39;OnClcik&#39;</span><span class="p">);</span>
                        <span class="p">},</span>
                        <span class="nl">btnOkIcon:</span> <span class="n">Icons</span><span class="p">.</span><span class="n">check_circle</span><span class="p">,</span>
                        <span class="nl">onDissmissCallback:</span> <span class="p">()</span> <span class="p">{</span>
                          <span class="n">debugPrint</span><span class="p">(</span><span class="s1">&#39;Dialog Dissmiss from callback&#39;</span><span class="p">);</span>
                        <span class="p">})</span>
                      <span class="p">..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;No Header Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">cyan</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">headerAnimationLoop:</span> <span class="kc">false</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">NO_HEADER</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;No Header&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span>
                          <span class="s1">&#39;Dialog description here..................................................&#39;</span><span class="p">,</span>
                      <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{</span>
                        <span class="n">debugPrint</span><span class="p">(</span><span class="s1">&#39;OnClcik&#39;</span><span class="p">);</span>
                      <span class="p">},</span>
                      <span class="nl">btnOkIcon:</span> <span class="n">Icons</span><span class="p">.</span><span class="n">check_circle</span><span class="p">,</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Custom Body Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">blueGrey</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">SCALE</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">INFO</span><span class="p">,</span>
                      <span class="nl">body:</span> <span class="n">Center</span><span class="p">(</span>
                        <span class="nl">child:</span> <span class="n">Text</span><span class="p">(</span>
                          <span class="s1">&#39;If the body is specified, then title and description will be ignored, this allows to further customize the dialogue.&#39;</span><span class="p">,</span>
                          <span class="nl">style:</span> <span class="n">TextStyle</span><span class="p">(</span><span class="nl">fontStyle:</span> <span class="n">FontStyle</span><span class="p">.</span><span class="n">italic</span><span class="p">),</span>
                        <span class="p">),</span>
                      <span class="p">),</span>
                      <span class="nl">title:</span> <span class="s1">&#39;This is Ignored&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span> <span class="s1">&#39;This is also Ignored&#39;</span><span class="p">,</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Auto Hide Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">purple</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">INFO</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">SCALE</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;Auto Hide Dialog&#39;</span><span class="p">,</span>
                      <span class="nl">desc:</span> <span class="s1">&#39;AutoHide after 2 seconds&#39;</span><span class="p">,</span>
                      <span class="nl">autoHide:</span> <span class="n">Duration</span><span class="p">(</span><span class="nl">seconds:</span> <span class="m">2</span><span class="p">),</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Testing Dialog&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">orange</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">keyboardAware:</span> <span class="kc">true</span><span class="p">,</span>
                      <span class="nl">dismissOnBackKeyPress:</span> <span class="kc">false</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">WARNING</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">BOTTOMSLIDE</span><span class="p">,</span>
                      <span class="nl">btnCancelText:</span> <span class="s2">&#34;Cancel Order&#34;</span><span class="p">,</span>
                      <span class="nl">btnOkText:</span> <span class="s2">&#34;Yes, I will pay&#34;</span><span class="p">,</span>
                      <span class="nl">title:</span> <span class="s1">&#39;Continue to pay?&#39;</span><span class="p">,</span>
                      <span class="nl">padding:</span> <span class="kd">const</span> <span class="n">EdgeInsets</span><span class="p">.</span><span class="n">all</span><span class="p">(</span><span class="m">16.0</span><span class="p">),</span>
                      <span class="nl">desc:</span>
                          <span class="s1">&#39;Please confirm that you will pay 3000 INR within 30 mins. Creating orders without paying will create penalty charges, and your account may be disabled.&#39;</span><span class="p">,</span>
                      <span class="nl">btnCancelOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                      <span class="nl">btnOkOnPress:</span> <span class="p">()</span> <span class="p">{},</span>
                    <span class="p">).</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
                <span class="n">SizedBox</span><span class="p">(</span>
                  <span class="nl">height:</span> <span class="m">16</span><span class="p">,</span>
                <span class="p">),</span>
                <span class="n">AnimatedButton</span><span class="p">(</span>
                  <span class="nl">text:</span> <span class="s1">&#39;Body with Input&#39;</span><span class="p">,</span>
                  <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">blueGrey</span><span class="p">,</span>
                  <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                    <span class="n">late</span> <span class="n">AwesomeDialog</span> <span class="n">dialog</span><span class="p">;</span>
                    <span class="n">dialog</span> <span class="o">=</span> <span class="n">AwesomeDialog</span><span class="p">(</span>
                      <span class="nl">context:</span> <span class="n">context</span><span class="p">,</span>
                      <span class="nl">animType:</span> <span class="n">AnimType</span><span class="p">.</span><span class="n">SCALE</span><span class="p">,</span>
                      <span class="nl">dialogType:</span> <span class="n">DialogType</span><span class="p">.</span><span class="n">INFO</span><span class="p">,</span>
                      <span class="nl">keyboardAware:</span> <span class="kc">true</span><span class="p">,</span>
                      <span class="nl">body:</span> <span class="n">Padding</span><span class="p">(</span>
                        <span class="nl">padding:</span> <span class="kd">const</span> <span class="n">EdgeInsets</span><span class="p">.</span><span class="n">all</span><span class="p">(</span><span class="m">8.0</span><span class="p">),</span>
                        <span class="nl">child:</span> <span class="n">Column</span><span class="p">(</span>
                          <span class="nl">children:</span> <span class="o">&lt;</span><span class="n">Widget</span><span class="o">&gt;</span><span class="p">[</span>
                            <span class="n">Text</span><span class="p">(</span>
                              <span class="s1">&#39;Form Data&#39;</span><span class="p">,</span>
                              <span class="nl">style:</span> <span class="n">Theme</span><span class="p">.</span><span class="n">of</span><span class="p">(</span><span class="n">context</span><span class="p">).</span><span class="n">textTheme</span><span class="p">.</span><span class="n">headline6</span><span class="p">,</span>
                            <span class="p">),</span>
                            <span class="n">SizedBox</span><span class="p">(</span>
                              <span class="nl">height:</span> <span class="m">10</span><span class="p">,</span>
                            <span class="p">),</span>
                            <span class="n">Material</span><span class="p">(</span>
                              <span class="nl">elevation:</span> <span class="m">0</span><span class="p">,</span>
                              <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">blueGrey</span><span class="p">.</span><span class="n">withAlpha</span><span class="p">(</span><span class="m">40</span><span class="p">),</span>
                              <span class="nl">child:</span> <span class="n">TextFormField</span><span class="p">(</span>
                                <span class="nl">autofocus:</span> <span class="kc">true</span><span class="p">,</span>
                                <span class="nl">minLines:</span> <span class="m">1</span><span class="p">,</span>
                                <span class="nl">decoration:</span> <span class="n">InputDecoration</span><span class="p">(</span>
                                  <span class="nl">border:</span> <span class="n">InputBorder</span><span class="p">.</span><span class="n">none</span><span class="p">,</span>
                                  <span class="nl">labelText:</span> <span class="s1">&#39;Title&#39;</span><span class="p">,</span>
                                  <span class="nl">prefixIcon:</span> <span class="n">Icon</span><span class="p">(</span><span class="n">Icons</span><span class="p">.</span><span class="n">text_fields</span><span class="p">),</span>
                                <span class="p">),</span>
                              <span class="p">),</span>
                            <span class="p">),</span>
                            <span class="n">SizedBox</span><span class="p">(</span>
                              <span class="nl">height:</span> <span class="m">10</span><span class="p">,</span>
                            <span class="p">),</span>
                            <span class="n">Material</span><span class="p">(</span>
                              <span class="nl">elevation:</span> <span class="m">0</span><span class="p">,</span>
                              <span class="nl">color:</span> <span class="n">Colors</span><span class="p">.</span><span class="n">blueGrey</span><span class="p">.</span><span class="n">withAlpha</span><span class="p">(</span><span class="m">40</span><span class="p">),</span>
                              <span class="nl">child:</span> <span class="n">TextFormField</span><span class="p">(</span>
                                <span class="nl">autofocus:</span> <span class="kc">true</span><span class="p">,</span>
                                <span class="nl">keyboardType:</span> <span class="n">TextInputType</span><span class="p">.</span><span class="n">multiline</span><span class="p">,</span>
                                <span class="nl">maxLengthEnforced:</span> <span class="kc">true</span><span class="p">,</span>
                                <span class="nl">minLines:</span> <span class="m">2</span><span class="p">,</span>
                                <span class="nl">maxLines:</span> <span class="kc">null</span><span class="p">,</span>
                                <span class="nl">decoration:</span> <span class="n">InputDecoration</span><span class="p">(</span>
                                  <span class="nl">border:</span> <span class="n">InputBorder</span><span class="p">.</span><span class="n">none</span><span class="p">,</span>
                                  <span class="nl">labelText:</span> <span class="s1">&#39;Description&#39;</span><span class="p">,</span>
                                  <span class="nl">prefixIcon:</span> <span class="n">Icon</span><span class="p">(</span><span class="n">Icons</span><span class="p">.</span><span class="n">text_fields</span><span class="p">),</span>
                                <span class="p">),</span>
                              <span class="p">),</span>
                            <span class="p">),</span>
                            <span class="n">SizedBox</span><span class="p">(</span>
                              <span class="nl">height:</span> <span class="m">10</span><span class="p">,</span>
                            <span class="p">),</span>
                            <span class="n">AnimatedButton</span><span class="p">(</span>
                                <span class="nl">text:</span> <span class="s1">&#39;Close&#39;</span><span class="p">,</span>
                                <span class="nl">pressEvent:</span> <span class="p">()</span> <span class="p">{</span>
                                  <span class="n">dialog</span><span class="p">.</span><span class="n">dissmiss</span><span class="p">();</span>
                                <span class="p">})</span>
                          <span class="p">],</span>
                        <span class="p">),</span>
                      <span class="p">),</span>
                    <span class="p">)..</span><span class="n">show</span><span class="p">();</span>
                  <span class="p">},</span>
                <span class="p">),</span>
              <span class="p">],</span>
            <span class="p">),</span>
          <span class="p">),</span>
        <span class="p">)));</span>
  <span class="p">}</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><p>您可以根据自己的需要进行修改和试验</p></div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2021-05-24</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" data-title="《Flutter插件awesome_dialog》" data-hashtags="flutter,插件"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" data-hashtag="flutter"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Hacker News" data-sharer="hackernews" data-url="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" data-title="《Flutter插件awesome_dialog》"><i class="fab fa-hacker-news fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" data-title="《Flutter插件awesome_dialog》"><i data-svg-src="https://cdn.jsdelivr.net/npm/simple-icons@2.14.0/icons/line.svg"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://luckly.work/flutter%E6%8F%92%E4%BB%B6awesome_dialog/" data-title="《Flutter插件awesome_dialog》" data-image="https://luckly007.oss-cn-beijing.aliyuncs.com/img/90c6cc12-742e-4c9f-b318-b912f163b8d0.png"><i class="fab fa-weibo fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/flutter/">flutter</a>,&nbsp;<a href="/tags/%E6%8F%92%E4%BB%B6/">插件</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/%E5%9C%A8flutter%E4%B8%AD%E7%9A%84%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A71/" class="prev" rel="prev" title="《在Flutter中的开发小技巧1》"><i class="fas fa-angle-left fa-fw"></i>《在Flutter中的开发小技巧1》</a>
            <a href="/dart%E4%B9%8Blist%E7%9B%B8%E5%85%B3/" class="next" rel="next" title="《Dart之List相关》">《Dart之List相关》<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
</article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.79.1">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2021</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/" target="_blank">早起的年轻人</a></span>&nbsp;|&nbsp;<span class="license"><a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.css"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/autocomplete.js@0.37.1/dist/autocomplete.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/algoliasearch@4.2.0/dist/algoliasearch-lite.umd.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sharer.js@0.4.0/sharer.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookieconsent@3.1.1/build/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":10},"comment":{},"cookieconsent":{"content":{"dismiss":"同意","link":"了解更多","message":"本网站使用 Cookies 来改善您的浏览体验."},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"search":{"algoliaAppID":"PASDMWALPK","algoliaIndex":"index.zh-cn","algoliaSearchKey":"b42948e51daaa93df92381c8e2ac0f93","highlightTag":"em","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"algolia"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
